#include <stdio.h>
int Gcd(int a, int b);
main() {	 	   			 
    int a, b, c;
    printf("Input a,b:\n");
    scanf("%d,%d", &a, &b); //1
    c = Gcd(a, b);  //1
    if (c != -1) //1
    {  
        printf("Greatest Common Divisor of %d and %d is %d\n", a, b, c); //1
    } 
    else 
    {	 	   			 
        printf("Input number should be positive!\n"); //1
    }
}	 	   			 
int Gcd(int a, int b) //1
{  
    int i, t;
    if (a <= 0 || b <= 0) //1
    {  
        return -1; //1
    }
    t = a < b ? a : b;  //2
    for (i = t; i > 0; i--)//2
    {  
        if (a % i == 0 && b % i == 0)//1
           return i;  //1
    }
    return 1; //1
    }